﻿<UserControl x:Class="eWallet.Windows.Controls.SecretsList"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:eWallet="clr-namespace:eWallet.Windows.Controls"
	Height="Auto" Width="Auto">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		
		<GroupBox Name="TagsGroup" Grid.Row="0" Header="Tags">
			<eWallet:TagCloud x:Name="TagCloud" ShowInitialSelectedLabel="True" InitialSelectedLabel="All" TagClicked="TagCloud_TagClicked" SelectedLabelsChanged="TagCloud_SelectedLabelsChanged" />
		</GroupBox>

		<ListView Name="SecretListView" Grid.Row="1" MouseDoubleClick="SecretListView_MouseDoubleClick" SelectionChanged="SecretListView_SelectionChanged">
			<ListView.View>
				<GridView>
					<GridViewColumn Header="Group" DisplayMemberBinding="{Binding Path=Group}" />
					<GridViewColumn Header="Description" DisplayMemberBinding="{Binding Path=Description}" />
					<GridViewColumn Header="Tags" x:Name="TagsColumn" DisplayMemberBinding="{Binding Path=Tags}" />
					<GridViewColumn Header="Content Type" DisplayMemberBinding="{Binding Path=ContentType}" />
					<GridViewColumn Header="File Name" DisplayMemberBinding="{Binding Path=FileName}" />
				</GridView>
			</ListView.View>
			<ListView.ContextMenu>
				<ContextMenu>
					<MenuItem Header="_New" Name="NewMenuItem" Click="NewMenuItem_Click" ToolTip="Select this command to create a new secret."></MenuItem>
					<MenuItem Header="_Open" Name="OpenMenuItem" IsEnabled="False" FontWeight="Bold" Click="OpenMenuItem_Click" ToolTip="Select this command to open the selected secret for viewing or editing."></MenuItem>
					<Separator />
					<MenuItem Header="Open _Group" Name="OpenGroupMenuItem" IsEnabled="False" Click="OpenGroupMenuItem_Click" ToolTip="Select this command to open the group of the selected secret for viewing or editing."></MenuItem>
					<Separator></Separator>
					<MenuItem Header="_Delete" Name="DeleteMenuItem" IsEnabled="False" Click="DeleteMenuItem_Click" ToolTip="Select this command to delete the selected secrets."></MenuItem>
				</ContextMenu>
			</ListView.ContextMenu>
		</ListView>
	</Grid>
</UserControl>
